﻿namespace GoodAdmin.CodeGenerator;

public class CodeGenSimpleConfigService : DbRepository<CodeGenSimpleConfig>, ICodeGenSimpleConfigService
{
    private readonly ICodeGenService _codeGenService;

    public CodeGenSimpleConfigService(ICodeGenService codeGenService)
    {
        _codeGenService = codeGenService;
    }
    public async Task Add(CodeGenSimpleConfigAddInput input)
    {

        var codeGenBaseData = input.Adapt<CodeGenDataAddInput>();
        await _codeGenService.Add(codeGenBaseData);
        var simpleConfig= input.Adapt<List<CodeGenSimpleConfig>>();
    }

    public async Task Delete(BaseIdInput input)
    {
        await _codeGenService.Delete(input);
        await DeleteAsync(it=>it.CodeGenId==input.Id);
    }

    public Task Update(CodeGenSimpleConfigUpdateInput input)
    {
        throw new NotImplementedException();
    }
}
